﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReceiptRevert.aspx.cs" Inherits="WMS6.Web.Inbound.ReceiptRevert" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>ReceiptRevert</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>    
    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>
    <script src="../Js/checkbox.js" type="text/javascript"></script>
    <script src="../Js/Verification.js" type="text/javascript"></script>
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }
        
        function newReceiving()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "Receiving.aspx?from=" + escape(from);
            return false;
        }
        function Check(lineId,qtyId)
        {    
              var type = true; 
              var checkvalue=document.getElementById("hidCheck").value.split(',');
           
             for(var i =0;checkvalue.length>i;i++ )
             {
                  if(checkvalue[i] == lineId)
                  {
                      type=false;
                      document.getElementById("hidCheck").value= document.getElementById("hidCheck").value.replace(lineId+',' ,"");
                      document.getElementById(qtyId).innerHTML = document.getElementById(qtyId).innerHTML.replace('-','');
                       return;
                  }     
              }         
              
              if(type)
              {
                  if(document.getElementById(qtyId).innerHTML > 0)
                  {
                     document.getElementById("hidCheck").value += lineId+',';
                     document.getElementById(qtyId).innerHTML = '-'+document.getElementById(qtyId).innerHTML;
                  }
              }            
        }
      function pageselectAll(chkbox,gv)
     {
         var state = chkbox.checked;                  
         var TargetBaseControl = document.getElementById(gv);  
         var TargetChildControl = chkbox;          
         var Inputs = TargetBaseControl.getElementsByTagName("input"); 
         for(var i=0;i<Inputs.length;i++)
         {
            if(Inputs[i].type == 'checkbox')
            {
                Inputs[i].checked = state;
                if(state)
                {
                
                }
                else
                {
                
                }
            }
         }
      }	
        
        //弹出窗口选择承运商
        function selectReceipt()
        {
            var rtnValue = popModalWindow('../Inbound/ASNQuery.aspx?action=txtReceiptID','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtReceiptID").focus();
                document.getElementById("txtReceiptID").value = rtnValue;
                __doPostBack("ReceiptID_TextChanged","");
            }
        }
    </script>
</head>
<body>
    <form id="F4031" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
          <asp:UpdatePanel ID="up1" runat="server">
        <ContentTemplate>
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom"><asp:Label ID="lblASN" runat="server" CssClass="label_header" 
                            Text="取消收货" meta:resourcekey="lblASN"></asp:Label></td>
                     <td><asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" CssClass="button" 
                             Enabled="False" Text="<%$Resources:ButtonResource,btnNew%>"  AccessKey="b"   /></td>
                    <td><asp:Button ID="btnRefresh" runat="server" CssClass="button" Enabled="False" 
                            Text="<%$Resources:ButtonResource,btnRefresh%>"  AccessKey="e" OnClick="btnRefresh_Click" 
                              /></td>
                    <td><asp:Button ID="btnSave" runat="server" CssClass="button" Enabled="False" 
                            Text="<%$Resources:ButtonResource,btnSave%>" OnClick="btnSave_Click"  AccessKey="a" 
                             /></td>
                </tr>
            </table>
        </div>
        
      
        <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                meta:resourcekey="lblMsg"></asp:Label>
        </div>
        <div id="div_menu">
            <div style="float: left; width: 8px;">
                <div class="tabL" id="divL1"></div>
            </div>
            <div style="float:left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)" id="divM1">
                <asp:Label ID="one1" CssClass="hover" runat="server" 
                    meta:resourcekey="one1">常规</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="divR1"></div>
            </div>
            <div style="float: left; width: 8px;">
                <div class="tabL_1" id="divL2"></div>
            </div>
            <div style="float:left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,2)" id="divM2">
                <asp:Label ID="one2" CssClass="navigationlabel" runat="server" 
                    meta:resourcekey="one2">入库明细</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR_1" id="divR2"></div>
            </div>
        </div>
        <div id="div_content">
             <div id="con_one_1" style="display: block;">
                 <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                     <tr>
                         <td width="180">
                             <asp:Label ID="lblAdJustMentID" runat="server" CssClass="label" Text="调整单号" 
                                 meta:resourcekey="lblAdJustMentID"></asp:Label>
                         </td>
                         <td width="180">
                        
                         <td width="180">
                       
                         <td width="180">
               
                     </tr>
                     <tr>
                         <td>
                             <asp:TextBox ID="txtAdJustMentID" runat="server" CssClass="textbox" 
                                 MaxLength="30" meta:resourcekey="txtAdJustMentID" ></asp:TextBox>
                         </td>
                         <td>
                           
                         <td>
                         
                          <td></td>
                     </tr>       
                     
                      <tr>
                         <td width="180">
                             <asp:Label ID="lblReceiptID" runat="server" CssClass="label" Text="入库通知单号" 
                                 meta:resourcekey="lblReceiptID"></asp:Label><font class="must_input">*</font>
                         </td>
                         <td width="180">
                        
                         <td width="180">
                       
                         <td width="180">
               
                     </tr>
                     <tr>
                         <td>
                             <asp:TextBox ID="txtReceiptID" runat="server" CssClass="textbox" 
                                 OnTextChanged="ReceiptID_TextChanged" AutoPostBack="True" 
                                 meta:resourcekey="txtReceiptID"  ></asp:TextBox><img src="../Images/icon_find.gif" alt="选择入库通知单号" class="img" onclick="selectReceipt();" id="img1" runat="server" />
                         </td>
                         <td>
                           
                         <td>
                         
                          <td></td>
                     </tr>   
                       <tr>
                         <td width="180">
                             <asp:Label ID="lblOwnerID" runat="server" CssClass="label" Text="货主代码" 
                                 meta:resourcekey="lblOwnerID"></asp:Label>
                         </td>
                         <td width="180">
                        
                         <td width="180">
                       
                         <td width="180">
               
                     </tr>
                     <tr>
                         <td>
                             <asp:TextBox ID="txtOwnerID" runat="server" CssClass="textbox" MaxLength="30" 
                                 Enabled="False" meta:resourcekey="txtOwnerID" ></asp:TextBox>
                         </td>
                         <td>
                           
                         <td>
                         
                          <td></td>
                     </tr>   
                       <tr>
                         <td width="180">
                             <asp:Label ID="lblAdJustMentDate" runat="server" CssClass="label" Text="调整日期" 
                                 meta:resourcekey="lblAdJustMentDate"></asp:Label><font class="must_input">*</font>
                         </td>
                         <td width="180">
                        
                         <td width="180">
                       
                         <td width="180">
               
                     </tr>
                     <tr>
                         <td>
                             <asp:TextBox ID="txtAdJustMentDate" runat="server" CssClass="textbox" 
                                 MaxLength="30" onblur="JavaScript:dataVer._IsTime(this,'lblMsg')" 
                                 meta:resourcekey="txtAdJustMentDate" ></asp:TextBox><img src="../Images/calendar.gif" class="img" alt="请选择日期" id="img" runat="server" onclick="setday(this,txtAdJustMentDate)"/>
                         </td>
                         <td>
                           
                         <td>
                         
                          <td></td>
                     </tr>   
                     <tr style="height:10px;">
                         <td width="180"></td>
                         <td width="180"></td>
                         <td width="180"></td>
                         <td width="180"></td>
                     </tr>
                 </table>
             </div>
             
             <div id="con_one_2" style="display: none;  overflow-x:auto; overflow-y:hidden;">
                 <table width="1000px" style="display: block; margin-left: 10px; margin-top: 10px;">
                     <tr>
                         <td>
                             <table>
                                 <tr>
                                     <td>
                                        
                                     </td>
                                     <td>
                                       
                                     </td>
                                 </tr>
                             </table>
                         </td>
                     </tr>
                     <tr style="height: 10px;">
                         <td>
                         </td>
                         <td>
                         </td>
                     </tr>
                     <tr>
                         <td >
                             <div>
                                 <asp:GridView ID="gvadjustmentDetail" runat="server" AllowSorting="True" 
                                     AutoGenerateColumns="False" CssClass="gridview" Width="1100px" onrowdatabound="gvadjustmentDetail_RowDataBound" 
                                     DataKeyNames="ReceiptID,ReceiptLineID,IsGenPutAway,TransID"  AllowPaging="True" 
                                     OnPageIndexChanging="gvadjustmentDetail_PageIndexChanging" oninit="gvadjustmentDetail_Init" 
                                     onsorting="gvadjustmentDetail_Sorting" 
                                     meta:resourcekey="gvadjustmentDetail" >
                                     <FooterStyle CssClass="GridViewFooterStyle" />
                                     <RowStyle CssClass="GridViewRowStyle" />
                                     <HeaderStyle CssClass="GridViewHeaderStyle" />
                                         <PagerStyle CssClass="GridViewPageStyle" />
                                     <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                     <Columns>
                                         <asp:BoundField HeaderText="序号" FooterText="序号" 
                                             meta:resourcekey="No">
                                             <ItemStyle CssClass="GridViewRowWidth_40" />
                                         </asp:BoundField>
                                            <asp:TemplateField meta:resourcekey="TemplateField" >
                                                <HeaderTemplate>
                                                    <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('4031','gvadjustmentDetail');" onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                                    <asp:CheckBox ID="CheckBox1" runat="server"  
                                                        onclick="selectAll(this,'gvadjustmentDetail');" 
                                                        meta:resourcekey="CheckBox1"/> 
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="chbSelect" runat="server" 
                                                        meta:resourcekey="chbSelect" />
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    <asp:CheckBox ID="CheckBox2" runat="server"   
                                                        onclick="selectAll(this,'gvadjustmentDetail');" 
                                                        meta:resourcekey="CheckBox2" /> 
                                                </FooterTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50"/>
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50"/>
                                            </asp:TemplateField>      
                                         <asp:BoundField DataField="ReceiptLineID" HeaderText="行号" FooterText="行号" 
                                             SortExpression="ReceiptLineID" meta:resourcekey="ReceiptLineID">
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:BoundField>
                                         <asp:BoundField DataField="SkuID" HeaderText="货品代码" FooterText="货品代码" 
                                             SortExpression="SkuID" meta:resourcekey="SkuID">
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:BoundField>
                                         <asp:BoundField DataField="Loc" HeaderText="货位代码" FooterText="货位代码" 
                                             SortExpression="Loc" meta:resourcekey="Loc">
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:BoundField>
                                          <asp:BoundField DataField="Lot" HeaderText="批次号" FooterText="批次号" 
                                             SortExpression="Lot" meta:resourcekey="Lot">
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:BoundField>        
                                          <asp:BoundField DataField="LpnID" HeaderText="移动单元" FooterText="移动单元" 
                                             SortExpression="LpnID" meta:resourcekey="LpnID">
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:BoundField>                                            
                                         <asp:TemplateField FooterText="数量" HeaderText="数量" SortExpression="Qty" 
                                             meta:resourcekey="Qty">
                                             <ItemTemplate>
                                                 <asp:Label ID="lblQty" runat="server" 
                                                     Text='<%# GetPreferenceDigit(Eval("Qty").ToString()) %>' 
                                                     meta:resourcekey="lblQty"></asp:Label>
                                             </ItemTemplate>
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:TemplateField>
                                         <asp:BoundField DataField="PackID" HeaderText="包装" FooterText="包装" 
                                             SortExpression="PackID" meta:resourcekey="PackID">
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:BoundField>
                                         <asp:BoundField DataField="UomID" HeaderText="单位" FooterText="单位" 
                                             SortExpression="UomID" meta:resourcekey="UomID">
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:BoundField>
                                         <asp:BoundField DataField="IsGenPutAway" HeaderText="预上架" FooterText="预上架" 
                                             SortExpression="IsGenPutAway" meta:resourcekey="IsGenPutAway">
                                             <ItemStyle CssClass="GridViewRowWidth_100" />
                                         </asp:BoundField>
                                     </Columns>
                                 </asp:GridView>
                             </div>
                         </td>
                         <td>
                         </td>
                     </tr>
                      <tr style="height: 30px;">
                         <td>
                         </td>
                         <td>
                         </td>
                     </tr>
                 </table>
                     <div style="margin-left: 10px">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0">
                             <tr>
                                 <td class="Result_01">
                                     总计：
                                 </td>
                                 <td class="Result_02">
                                     <table>
                                         <tr>   <td Style="margin-right: 20px;"> &nbsp; &nbsp; </td>
                                             <td   >
                                                 <asp:Label ID="lblTotal" runat="server" Text="数量:" class="label"></asp:Label><asp:Label
                                                     ID="lblTotalQty" runat="server" Text="" class="label" Style="margin-right: 10px;"></asp:Label>
                                             </td>
                                         </tr>
                                     </table>
                                 </td>
                                 <td class="Result_03">
                                 </td>
                             </tr>
                              <tr  style="height:20px">
                                <td></td>
                                </tr>
                         </table>
                     </div>
             </div>
             
             <div id="con_one_3" style="display: none;">
                 <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                 </table>
             </div>
            
         </div>
            <input type="hidden" id="hdnReceiptID" runat="server" >
                <input id="hdnFrom" runat="server" type="hidden"></input>
                    <input id="hdnFlag" runat="server" type="hidden"></input>
                        <input id="hidCheck" runat="server" type="hidden"></input>
                            <input id="hdnDataFormat" runat="server" type="hidden"></input>
                                <input id="hdncalendarFlag" runat="server" type="hidden"></input>
                                </input>
                            </input>
                        </input>
                    </input>
                </input>
            </input>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnRefresh" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnNew" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />  
        </Triggers>
        </asp:UpdatePanel>
    </div>

    </form>
</body>
</html>
<script language="javascript" type="text/javascript" event="onclick" for="document">
		<!--
			hiddenCalendarDiv();
		//-->
</script>
